<?php
/**
 * 商会通讯录模块定义
 * 新vv睿vvv社vv区vv提vv供v！
 * @author zh0537cn
 * @url http://s.we7.cc/
 */
defined('IN_IA') or exit('Access Denied');

class Bbyscm_cardModule extends WeModule {

public function settingsDisplay($settings)
	{
		global $_W, $_GPC;
        load()->func('tpl');
        $uniacid = $_W['uniacid'];
$deat = pdo_fetch("SELECT * FROM " . tablename('bbyscm_card_sysset') . ' where `uniacid`=:uniacid limit 1', array(':uniacid' => $uniacid));
if (checksubmit('submit')) {
    $data['copyright'] = $_GPC['copyright'];
    $data['systel'] = $_GPC['systel'];
    $data['copyright'] = $_GPC['copyright'];
    $data['systel'] = $_GPC['systel'];
	$data['sysopenid'] = $_GPC['sysopenid'];
	$data['apikey'] = $_GPC['apikey'];
	$data['appid'] = $_GPC['appid'];
    $data['appsecret'] = $_GPC['appsecret'];
	$data['mchid'] = $_GPC['mchid'];
	$data['wxkey'] = $_GPC['wxkey'];
	$data['fxtext'] = $_GPC['fxtext'];
 if (empty($deat)) {
        $data['uniacid'] = $uniacid;
        pdo_insert('bbyscm_card_sysset', $data);
    } else {
        pdo_update('bbyscm_card_sysset', $data, array('uniacid' => $uniacid));
    }
   
		if (!isset($settings['job1'])) {
			$settings['job1'] = '总裁,总经理,副总经理,财务总监,营销总监,技术总监,助理,职员';
		}
		if (checksubmit()) {
			$cfg = array('job1' => $_GPC['job1']);
			$this->saveSettings($cfg);
		}
		message('更新参数设置成功！', 'refresh');
     }
	include $this->template('setting');
	}
}